POV-Ray : Newsgroups : povray.general : Arrays : Re: Arrays Server Time
7 Aug 2024 19:24:37 EDT (-0400)
  Re: Arrays  
From: Mr  Art
Date: 24 Jul 2001 19:53:24
Message: <3B5E42F2.58F59EC8@chesapeake.net>
On other projects I have "coded" the information so that the data stored
was all numeric but I made a decoding routine for displaying the
information.
Maybe you could do something like that with your project.

Bill DeWitt wrote:
> 
> "Ron Parker" <ron### [at] povrayorg> wrote in message
> news:slr### [at] fwicom...
> > On Tue, 24 Jul 2001 18:15:39 -0400, Bill DeWitt wrote:
> > >
> > >    I think I may have just noticed my problem with arrays. I am sure I
> read
> > >it once but I just noticed that the POV-Ray docs claim that arrays can
> only
> > >be as large as array[5][x]. Is this true?!
> >
> > I think you're misreading it.  The limitation involving the number 5 is
> > that arrays can have no more than 5 dimensions, so array[9][4] is okay,
> > but array[2][2][2][2][2][2] is not.
> 
>     See, that's what I thought the first time I read it (from what I thought
> the word "dimension" meant), but their examples led me to think otherwise.
> 
>     "Declaring Arrays...
>      Multi-dimensional arrays
>      up to five dimensions may
>      be declared. For example:
> 
>      #declare MyGrid = array[4][5]"
> 
>     Your explanation makes more sense... I was just boggled that the pov
> team thought that 5 items were all you needed...
> 
> > >    IOW, if I have a list of planetary data for 9 planets, listing their
> > >name, radius, mass and distance from sun, I have to rearrange it into a
> list
> > >of names, a list of masses, a list of radii and a list of distances? (I
> am
> > >doing this anyway to see if it solves my problems, but I am mad that for
> all
> > >this time I thought that I was just not understanding array
> initialization
> > >and reading)
> >
> > Note that once you fill in one value in an array, every other value in the
> > array must be of the same type.  Name and mass might not be the same type.
> 
>     Yeah, I was already planning to separate them into two arrays for my
> purposes. Thanks for the quick reply. I am trying to finish off my gravity
> well isosurface in the short times between dinner and work...


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.